package com.base.test.rabbitmq.dto;

import com.base.commons.tools.validator.group.DefaultGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * mq队列查询入参封装
 * @author qiaodong
 * @since 2021-04-07
 */
@Data
@ApiModel(value = "mq队列查询入参")
public class MqQueueReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "虚拟主机")
    @NotBlank(message="虚拟主机不能为空", groups = DefaultGroup.class)
    private String vhost;

    @ApiModelProperty(value = "队列名")
    @NotBlank(message="队列名不能为空", groups = DefaultGroup.class)
    private String queuename;

    @ApiModelProperty(value = "消息确认模式：ack_requeue_true/ack_requeue_false")
    @NotBlank(message="消息确认模式不能为空", groups = DefaultGroup.class)
    private String ackmode = "ack_requeue_true";

    @NotNull(message="消息数量不能为空", groups = DefaultGroup.class)
    @ApiModelProperty(value = "消息数量")
    private long count;

    @ApiModelProperty(value = "截断保留长度")
    private long truncate;
}
